package com.yanwq.sayhi.common.client;


import android.os.Handler;
import android.os.Looper;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Response;

/**
 * 作者：yanweiqiang。
 * 日期：2016/6/20 0020。
 */
public abstract class OkResponseCallback {
    public Call call = null;
    public Handler mHandler = new Handler(Looper.getMainLooper());

    public abstract void onStart();

    public abstract void onSuccess(Object obj);

    public void onFail(int status, String s, Throwable throwable) {
        FailureResultTool.handle(status, s, throwable);
    }

    public abstract void onStop();

    public abstract Object parse(Response response);
}
